
import projectlist
import recording

class Model(object):
    
    __model = None
    __wert = "einWert"
    __projectList = None
    
    def __init__(self):
        print "modelkonstruktor beginnt..."
        self.__projectList = projectlist.ProjectList()
        print "modelkonstruktor abgelaufen!"
        
    
    def getModel(self):
        if not self.__model:
            self.__model = Model()
            print "model erstellt und erhalten"
            return self.__model
        else:
            print "altes model erhalten"
            return self.__model
    
    def getWert(self):
        return self.__wert
    
    def getProjectList(self):
        return self.__projectList
        
    def load_sermons(self):
        p1 = recording.Recording("01.01.2011","Ich", "Keins")
        p2 = recording.Recording("02.02.2020","Du")
        p3 = recording.Recording("03.04.2000", "Er")
        #model = projectlist.projectlist.get_model()
        model = self.__projectList.get_model()
        model.append((p1,));
        model.append((p2,));
        model.append((p3,));